<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemConfigTablesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_config_tables', function (Blueprint $table) {
            $table->id()->comment('配置分类表');
            $table->integer('pid')->comment('上级分类id');
            $table->string('name')->comment('配置分类名称');
            $table->string('english_name')->unique()->comment('配置分类英文名称');
            $table->string('icon',30)->nullable()->comment('图标');
            $table->integer('type')->nullable()->comment('类型');
            $table->integer('sort')->default(0)->comment('排序');
            $table->tinyInteger('status')->default(1)->comment('配置分类状态 0=禁用 1=正常');
            $table->tinyInteger('is_show')->default(1)->comment('是否显示 0=隐藏 1=显示');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_config_tables');
    }
}
